#ifndef SETTINGS_DIALOG_H
#define SETTINGS_DIALOG_H

#include <QDialog>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QRadioButton>
#include <QPushButton>
#include <QLabel>
#include <QButtonGroup>
#include <QSettings>

class SettingsDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SettingsDialog(QWidget *parent = nullptr);
    ~SettingsDialog();

    enum LayoutType {
        CircularLayout = 0,
        ScatteredLayout = 1
    };

    LayoutType getSelectedLayout() const;
    void setCurrentLayout(LayoutType layout);

signals:
    void layoutChanged(LayoutType layout);

private slots:
    void onOkClicked();
    void onCancelClicked();
    void onLayoutChanged();

private:
    void setupUI();
    void loadSettings();
    void saveSettings();

private:
    QVBoxLayout *m_mainLayout;
    QGroupBox *m_layoutGroup;
    QRadioButton *m_circularRadio;
    QRadioButton *m_scatteredRadio;
    QButtonGroup *m_layoutButtonGroup;
    QPushButton *m_okButton;
    QPushButton *m_cancelButton;
    
    LayoutType m_currentLayout;
    QSettings *m_settings;
};

#endif // SETTINGS_DIALOG_H
